home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / QuickDraw3D 1.6 SDK / Mac SampleCode New for 1.6 / RollerCoasterSampleMac / READ ME.txt < prev    next >
Encoding:
Text File  |  1999-05-18  |  2.7 KB  |  49 lines  |  [TEXT/ttxt]

  1. - README -
  2.  
  3. RollerCoaster Sample Code Version 1.0
  4. 9/18/98
  5.  
  6. by Scott Kuechle
  7. Apple Developer Technical Support
  8.  
  9. ====================================================================
  10.  
  11. 1. ABOUT ROLLERCOASTER
  12.  
  13. RollerCoster demonstrates how to create a simple roller-coaster simulation using QuickDraw3D. It is based heavily on the orginial Gerbils code by Brian Greenstone. The program builds a simple track using the mesh geometry and then moves the camera location along the track to simulate a "ride".
  14.  
  15. 2. REQUIREMENTS
  16.  
  17. QuickDraw3D Mac/Windows 1.5.4 or better.
  18. QuickTime 3.0 or better for Mac/Windows
  19.  
  20. To run QuickDraw 3D on a Mac the user's machine must include: 
  21. *    A PowerPC processor 
  22. *    Macintosh System 7.12 with DragLib or later (7.5.1 recommended) 
  23. *    A hard drive 
  24. *    16MB RAM 
  25.  
  26. To run QuickDraw 3D on a PC the user's machine must include: 
  27. *    A Pentium processor 
  28. *    Windows 95 or Windows NT 
  29. *    A hard drive 
  30. *    16MB RAM
  31.  
  32. 3. BUILD ENVIRONMENTS
  33.  
  34. This sample was built on the Mac using Metrowerks CodeWarrior IDE version 2.1 with Universal Interfaces 3.2.
  35.  
  36. This sample was built under Windows using the Microsoft Visual C++ 4.0 development environment and the QuickTime 3.0 SDK Interfaces & Libraries.
  37.  
  38. 3. SPECIFICS
  39.  
  40. As mentioned previously, this code is based heavily on the Gerbils code by Brian Greenstone. The track in this sample is built using B-splines. For a good discussion of how to build a track using B-splines, refer to the document by Brian Greenstone titled "Making Cool QD3D Apps" on the Apple QuickTime web site (http://www.apple.com/quicktime/).
  41.  
  42. To construct the track we've first defined a number of track "sections", with each track section containing a simple list of control points (refer to the TrackSectionType data structure in the interface file Track.h). The Mac version of the sample has stored the track sections in a resource file - the Windows version has them stored in a file. The control points in each track section are used to build a spline curve for each section. Next, the track sections are rotated into place to form a closed loop representing the entire connected track. Finally, texturing is added (note: on the Mac the texturing files are loaded from resources - under Windows, each texture file is simply a separate data file which must be in the same folder as the application).
  43.  
  44. To simulate a "ride" on the track, the camera location is simply moved along the track from section-to-section. Many of the parameters used in building the track can be adjusted. See the interface file "Track.h" for the details.
  45.  
  46. 4. USING ROLLERCOASTER
  47.  
  48. Simply launch the application and you're off - the program automatically takes the user for a ride on the track. To quit, either click in the window close box or select <command><q> on the Mac, <control><q> under Windows.
  49.